feat: live slot migration for cluster resharding - #34
Merged
Conversation
implements the core migration types and state management: - Migration struct with source/target nodes and state tracking - MigrationManager for tracking active incoming/outgoing migrations - MigrationBatch for streaming keys between nodes - MigrationRedirect for MOVED/ASK responses - MigrationConfig for tuning batch sizes and timeouts
adds protocol support for slot migration commands: - CLUSTER SETSLOT <slot> IMPORTING <node-id> - CLUSTER SETSLOT <slot> MIGRATING <node-id> - CLUSTER SETSLOT <slot> NODE <node-id> - CLUSTER SETSLOT <slot> STABLE - MIGRATE host port key db timeout [COPY] [REPLACE] handlers return cluster-disabled error in non-cluster mode
adds protocol support for cluster management: - CLUSTER MEET <ip> <port> - CLUSTER ADDSLOTS <slot> [slot...] - CLUSTER DELSLOTS <slot> [slot...] - CLUSTER FORGET <node-id> - CLUSTER REPLICATE <node-id> - CLUSTER FAILOVER [FORCE|TAKEOVER] - CLUSTER COUNTKEYSINSLOT <slot> - CLUSTER GETKEYSINSLOT <slot> <count> all handlers return cluster-disabled error in non-cluster mode
kacy
added a commit
that referenced
this pull request
Feb 11, 2026
feat: live slot migration for cluster resharding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
migration.rsmodule with core migration types and state managementMigrationstruct tracking source/target nodes and state transitionsMigrationManagerfor tracking active incoming/outgoing migrationsMigrationBatchfor streaming keys between nodes during migrationTested
cargo test -p ember-cluster- 56 tests passcargo test -p ember-protocol- 223 tests passcargo test- all tests passcargo clippy- no warningsDesign considerations
MigrationConfigprovides tunables for batch sizes, timeouts, and delays